package com.baibei.ebec.user.address;


import com.baibei.basic.IPresenter;
import com.baibei.basic.IPresenterView;
import com.baibei.model.AddressInfo;

import java.util.List;

/**
 * 收货地址列表
 * Created by ChenRui on 2017/4/18 01:11.
 */
public interface AddressListContract {

    interface Presenter extends IPresenter {

        /**
         * 更新地址
         */
        void updateDefaultAddress(String addressId);

        /**
         * 删除地址
         */
        void deleteAddress(String addressId);
    }

    interface View extends IPresenterView {

        void onLoadAddress(List<AddressInfo> data);

        void onEmptyAddress(String msg);

        /**
         * 更新收货地址成功
         */
        void onUpdateAddressSuccess(String msg);

        /**
         * 更新失败
         *
         * @param msg
         */
        void onUpdateAddressFailed(String msg);

        /**
         * 删除收货地址成功
         */
        void onDeleteAddressSuccess(String msg);

        /**
         * 删除失败
         *
         * @param msg
         */
        void onDeleteAddressFailed(String msg);

        void onNotLogin();

        /**
         * hide
         */
        void hideLoading();

        /**
         * load
         */
        void showLoading();
    }
}
